<template>
  <div>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <!-- 城市等级配置 -->
      <el-tab-pane label="城市等级配置" name="1">
        <!-- 条件查询 -->
        <el-form :inline="true" :model="formInlineCity" class="demo-form-inline">
          <el-form-item label="城市等级">
            <el-select v-model="formInlineCity.cityGradeId">
              <el-option label="全部" :value="0"></el-option>
              <el-option v-for="item in cityGradeList" :label="item.cityGradeName" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-input v-model="formInlineCity.cityName" placeholder="输入城市名称查询"></el-input>
          </el-form-item>
          <el-form-item style="float: right">
            <el-button @click="cityResetting">重置</el-button>
            <el-button type="primary" @click="cityQuery">查询</el-button>
          </el-form-item>
          <hr>
        </el-form>
        <!-- 列表展示 -->
        <el-table
            :data="cityList"
            style="width: 100%">
          <el-table-column
              prop="id"
              label="序号"
              width="180">
          </el-table-column>
          <el-table-column
              prop="cityGradeName"
              label="城市等级"
              width="180">
          </el-table-column>
          <el-table-column
              prop="cityName"
              label="城市"
              width="180">
          </el-table-column>
          <el-table-column
              prop="updateId"
              label="更新人"
              width="180">
          </el-table-column>
          <el-table-column
              prop="updateTime"
              label="最后一次更新时间"
              width="180">
          </el-table-column>
          <el-table-column
              fixed="right"
              label="操作"
              width="100">
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="cityUpdate(scope.row)">修改</el-button>
            </template>
          </el-table-column>
        </el-table>
        <!-- 分页 -->
        <el-pagination
            @size-change="cityHandleSizeChange"
            @current-change="cityHandleCurrentChange"
            :current-page="cityPageNum"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="cityPageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="cityTotal">
        </el-pagination>

        <el-dialog title="收货地址" :visible.sync="dialogCityFormVisible">
          <el-form :model="dialogCityForm">
            <el-form-item label="城市名称" :label-width="cityFormLabelWidth">
              <el-input disabled v-model="dialogCityForm.cityName" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="城市等级" :label-width="cityFormLabelWidth">
              <el-select v-model="dialogCityForm.cityGradeId">
                <el-option label="请选择" :value="0"></el-option>
                <el-option v-for="item in cityGradeList" :label="item.cityGradeName" :value="item.id"></el-option>
              </el-select>
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="dialogCityFormVisible = false">取 消</el-button>
            <el-button type="primary" @click="citySave">确 定</el-button>
          </div>
        </el-dialog>

      </el-tab-pane>

      <!--  车辆类型配置    -->
      <el-tab-pane label="车辆类型配置" name="2">

        <!--      条件查询   -->
        <el-form :inline="true" :model="formInlineCar" class="demo-form-inline">
          <el-form-item class="bold-label" label="车辆类型:">
            <el-checkbox-group v-model="formInlineCar.carTypeId">
              <el-checkbox v-for="item in carTypeList" :label="item.id">{{ item.typeName }}</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          &nbsp;
          <el-form-item class="bold-label" label="能源类型:">
            <el-checkbox-group v-model="formInlineCar.carEnergyId">
              <el-checkbox v-for="item in carEnergyList" :label="item.id">{{ item.energyName }}</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <el-form-item style="float: right">
            <el-button @click="carResetting">重置</el-button>
            <el-button type="primary" @click="carQuery">查询</el-button>
          </el-form-item>
          <hr>
          <el-form-item label="车型">
            <el-input v-model="formInlineCar.vehicleModel" placeholder="请输入车型"></el-input>
          </el-form-item>
          &nbsp;
          <el-form-item label="品牌">
            <el-input v-model="formInlineCar.carBrand" placeholder="请输入品牌"></el-input>
          </el-form-item>
          &nbsp;
          <el-form-item label="厂商">
            <el-input v-model="formInlineCar.carManufactor" placeholder="请输入厂商"></el-input>
          </el-form-item>
          &nbsp;
          <el-button style="float: right" type="primary" @click="carAdd">新增</el-button>
        </el-form>
        <!-- 列表展示 -->
        <el-table
            :data="carList"
            height="540"
            style="width: 100%">
          <el-table-column
              prop="id"
              label="序号"
              width="130">
          </el-table-column>
          <el-table-column
              prop="carTypeName"
              label="车辆类型"
              width="130">
          </el-table-column>
          <el-table-column
              prop="vehicleModel"
              label="车型"
              width="130">
          </el-table-column>
          <el-table-column
              prop="carEnergyName"
              label="能源类型"
              width="130">
          </el-table-column>
          <el-table-column
              prop="carBrand"
              label="品牌"
              width="130">
          </el-table-column>
          <el-table-column
              prop="carManufactor"
              label="厂家"
              width="130">
          </el-table-column>
          <el-table-column
              prop="updateId"
              label="更新人"
              width="130">
          </el-table-column>
          <el-table-column
              prop="updateTime"
              label="最后一次更新时间"
              width="180">
          </el-table-column>
          <el-table-column
              fixed="right"
              label="操作"
              width="100">
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="carUpdate(scope.row)">修改</el-button>
            </template>
          </el-table-column>
        </el-table>
        <!-- 分页 -->
        <el-pagination
            @size-change="carHandleSizeChange"
            @current-change="carHandleCurrentChange"
            :current-page="carPageNum"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="carPageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="carTotal">
        </el-pagination>
        <!-- 汽车添加修改表单 -->
        <el-dialog :title="dialogCarFormVisibleTitle" :visible.sync="dialogCarFormVisible">
          <el-form :rules="rulesCar" ref="dialogCarForm" :model="dialogCarForm">
            <el-form-item prop="carTypeId" label="车辆类型" :label-width="cityFormLabelWidth">
              <el-radio-group v-model="dialogCarForm.carTypeId">
                <el-radio v-for="item in carTypeList" :label="item.id">{{ item.typeName }}</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item prop="vehicleModel" label="车型" :label-width="cityFormLabelWidth">
              <el-input v-model="dialogCarForm.vehicleModel" autocomplete="off" placeholder="请输入"></el-input>
            </el-form-item>
            <el-form-item prop="carEnergyId" label="能源类型" :label-width="cityFormLabelWidth">
              <el-radio-group v-model="dialogCarForm.carEnergyId">
                <el-radio v-for="item in carEnergyList" :label="item.id">{{ item.energyName }}</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item prop="carBrand" label="品牌" :label-width="cityFormLabelWidth">
              <el-input v-model="dialogCarForm.carBrand" autocomplete="off" placeholder="请输入"></el-input>
            </el-form-item>
            <el-form-item prop="carManufactor" label="厂家" :label-width="cityFormLabelWidth">
              <el-input v-model="dialogCarForm.carManufactor" autocomplete="off" placeholder="请输入"></el-input>
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="dialogCarFormVisible = false">返回</el-button>
            <el-button type="primary" @click="carSave('dialogCarForm')">保存</el-button>
          </div>
        </el-dialog>

      </el-tab-pane>
<!--   敏感词库   -->
      <el-tab-pane label="敏感词库" name="3">
        <el-form :inline="true" :model="formInlineSensitiveWords" class="demo-form-inline">
          <el-form-item>
            <el-input v-model="formInlineSensitiveWords.sensitiveWords" placeholder="输入敏感词查询"></el-input>
          </el-form-item>
          <el-form-item style="float: right">
            <el-button @click="sensitiveWordsResetting">重置</el-button>
            <el-button type="primary" @click="sensitiveWordsQuery">查询</el-button>
          </el-form-item>
          <hr>
          <el-button style="float: right" type="primary" @click="sensitiveWordsAdd">新增</el-button>
        </el-form>
        <!-- 列表展示 -->
        <el-table
            :data="sensitiveWordsList"
            height="540"
            style="width: 100%">
          <el-table-column
              prop="id"
              label="序号"
              width="180">
          </el-table-column>
          <el-table-column
              prop="sensitiveWords"
              label="敏感词"
              width="825">
          </el-table-column>
          <el-table-column
              fixed="right"
              label="操作"
              width="100">
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="sensitiveWordsUpdate(scope.row)">修改</el-button>
            </template>
          </el-table-column>
        </el-table>
        <!-- 分页 -->
        <el-pagination
            @size-change="sensitiveWordsHandleSizeChange"
            @current-change="sensitiveWordsHandleCurrentChange"
            :current-page="sensitiveWordsPageNum"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="sensitiveWordsPageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="sensitiveWordsTotal">
        </el-pagination>
        <!-- 敏感词添加修改表单 -->
        <el-dialog :title="dialogSensitiveWordsFormVisibleTitle" :visible.sync="dialogSensitiveWordsFormVisible">
          <el-form :rules="rulesCar" ref="dialogCarForm" :model="dialogSensitiveWordsForm">
            <el-form-item label="敏感词" :label-width="cityFormLabelWidth">
              <el-input v-model="dialogSensitiveWordsForm.sensitiveWords" autocomplete="off" placeholder="请输入"></el-input>
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="dialogSensitiveWordsFormVisible = false">返回</el-button>
            <el-button type="primary" @click="sensitiveWordsSave">保存</el-button>
          </div>
        </el-dialog>

      </el-tab-pane>
<!--   操作日志   -->
      <el-tab-pane label="操作日志" name="4">
        <!-- 条件查询 -->
        <el-form :inline="true" :model="formInlineLog" class="demo-form-inline"  size="mini">
          <el-form-item class="bold-label" label="操作模块:">
            <el-select v-model="formInlineLog.operationModule" clearable placeholder="请选择">
              <el-option label="全部" value="0"></el-option>
              <el-option label="城市等级配置" value="城市等级配置"></el-option>
              <el-option label="车辆类型配置" value="车辆类型配置"></el-option>
              <el-option label="敏感词库" value="敏感词库"></el-option>
              <el-option label="定价策略" value="定价策略"></el-option>
              <el-option label="派单策略" value="派单策略"></el-option>
              <el-option label="虚拟客服" value="虚拟客服"></el-option>
            </el-select>
          </el-form-item>
          &nbsp;
          <el-form-item label="操作前内容">
            <el-input v-model="formInlineLog.beforeOperation" placeholder="请输入"></el-input>
          </el-form-item>
          <el-form-item label="操作后内容">
            <el-input v-model="formInlineLog.afterOperation" placeholder="请输入"></el-input>
          </el-form-item>
          <el-form-item style="float: right">
            <el-button @click="logResetting">重置</el-button>
            <el-button type="primary" @click="logQuery">查询</el-button>
          </el-form-item>
          <hr>
          <el-form-item label="操作时间">
            <div class="block">
              <el-date-picker
                  v-model="logTime"
                  type="datetimerange"
                  range-separator="至"
                  start-placeholder="开始时间"
                  end-placeholder="结束时间">
              </el-date-picker>
            </div>
          </el-form-item>
          &nbsp;
          <el-form-item class="bold-label" label="操作类型:">
            <el-checkbox-group v-model="formInlineLog.operationType">
              <el-checkbox label="新增" value="1"></el-checkbox>
              <el-checkbox label="修改" value="2"></el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          &nbsp;
          <el-form-item label="操作人">
            <el-input v-model="formInlineLog.updateName" placeholder="请输入"></el-input>
          </el-form-item>
          &nbsp;
          <el-form-item style="float: right">
            <el-button type="primary" @click="logExport">导出</el-button>
          </el-form-item>
        </el-form>
        <!-- 列表展示 -->
        <el-table
            :data="logList"
            height="540"
            style="width: 100%">
          <el-table-column
              prop="id"
              label="序号">
          </el-table-column>
          <el-table-column
              prop="operationModule"
              label="操作模块">
          </el-table-column>
          <el-table-column
              label="操作类型">
            <template v-slot="scope">
              {{ scope.row.operationType == 1 ? '新增' : '修改' }}
            </template>
            </el-table-column>
          <el-table-column
              prop="updateId"
              label="操作人">
          </el-table-column>
          <el-table-column
              prop="beforeOperation"
              label="操作前内容">
          </el-table-column>
          <el-table-column
              prop="afterOperation"
              label="操作后内容">
          </el-table-column>
          <el-table-column
              prop="updateTime"
              label="操作时间">
          </el-table-column>
        </el-table>
        <!-- 分页 -->
        <el-pagination
            @size-change="logHandleSizeChange"
            @current-change="logHandleCurrentChange"
            :current-page="logPageNum"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="logPageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="logTotal">
        </el-pagination>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import axios from "axios";

export default {
  data() {
    return {
      /*
      ------------------------------------------------
      * 城市等级配置
      * */
      activeName: '1', // 标签页的默认值
      // 城市等级配置查询表单
      formInlineCity: {
        // 城市等级
        cityGradeId: 0,
        // 城市名
        cityName: "",
      },
      // 城市等级配置列表
      cityList: [],
      // 分页
      cityPageNum: 1,
      cityPageSize: 10,
      cityTotal: 0,
      // 获取城市等级配置列表
      cityGradeList: [],
      // 城市弹出框
      dialogCityFormVisible: false,
      // 城市修改表单
      dialogCityForm: {},
      // 城市修改表单宽度
      cityFormLabelWidth: '120px',

      /*
      ------------------------------------------------
      * 车辆类型配置
      * */
      formInlineCar: {
        carTypeId: [1, 2, 3, 4],
        carEnergyId: [1, 2, 3],
        vehicleModel: "",
        carBrand: "",
        carManufactor: ""
      },
      carList: [],
      carEnergyList: [],
      carTypeList: [],
      // 分页
      carPageNum: 1,
      carPageSize: 10,
      carTotal: 0,
      // 车辆类型配置查询表单
      dialogCarFormVisible: false,
      dialogCarForm: {},
      dialogCarFormVisibleTitle: "",
      // 车辆类型配置表单验证
      rulesCar: {
        vehicleModel: [
          {required: true, message: '请输入车型', trigger: 'blur'},
        ],
        carBrand: [
          {required: true, message: '请输入品牌', trigger: 'blur'},
        ],
        carManufactor: [
          {required: true, message: '请输入厂家', trigger: 'blur'},
        ],
        carTypeId: [
          {required: true, message: '请选择车辆类型', trigger: 'change'},
          {validator: (rule, value) => { if (value === 0) { return Promise.reject('请选择车辆类型'); } else { return Promise.resolve(); } }, trigger: 'change' }
          // { pattern: 1,  message: '123', trigger: 'blur' }
        ],
        carEnergyId: [
          {required: true, message: '请选择能源类型', trigger: 'change'},
        ],
      },
      /*
      ------------------------------------------------
      * 敏感词库
      * */
      // 敏感词库查询表单
      formInlineSensitiveWords:{
        sensitiveWords: ""
      },
      // 敏感词库列表
      sensitiveWordsList:[],
      // 分页
      sensitiveWordsPageNum: 1,
      sensitiveWordsPageSize: 10,
      sensitiveWordsTotal: 0,
      dialogSensitiveWordsFormVisibleTitle: "",
      dialogSensitiveWordsFormVisible: false,
      dialogSensitiveWordsForm: {
        sensitiveWords: ""
      },
      /**
       * 敏感词库
       */
      // 日志查询表单
      formInlineLog:{},
      logTime:[],
      logList:[],
      // 分页
      logPageNum: 1,
      logPageSize: 10,
      logTotal: 0,

    };
  },
  methods: {
    // 标签页点击事件
    handleClick(tab, event) {
      console.log(tab, event);
      if (this.activeName == '2') {
        this.getCarList();
        this.getCarEnergyList();
        this.getCarTypeList();
      }
      if (this.activeName == '3') {
        this.getSensitiveWordsList();
      }
      if (this.activeName == '4') {
        this.getLogList();
      }
    },
    cityHandleSizeChange(val) {
      this.cityPageSize = val
      this.getCityList();
    },
    cityHandleCurrentChange(val) {
      this.cityPageNum = val;
      this.getCityList();
    },
    // 城市等级配置查询表单重置
    cityResetting() {
      this.formInlineCity = {
        cityGradeId: 0,
        cityName: "",
      };
    },
    // 获取城市等级配置列表
    getCityList() {
      axios.get(`http://localhost:10086/api-city/city/list?pageNum=${this.cityPageNum}&pageSize=${this.cityPageSize}&cityGradeId=${this.formInlineCity.cityGradeId}&cityName=${this.formInlineCity.cityName}`).then(res => {
        console.log(res)
        this.cityList = res.data.data.list;
        this.cityTotal = res.data.data.total;
      })
    },
    // 获取城市等级配置列表
    getCityGradeList() {
      axios.get(`http://localhost:10086/api-city/city/cityGrade/list`).then(res => {
        console.log(res)
        this.cityGradeList = res.data.data;
      })
    },
    // 城市等级配置查询表单查询
    cityQuery() {
      this.getCityList();
    },
    dialogCityFormResetting() {
      this.dialogCityForm = {
        cityName: "",
        cityGradeId: 0,
      };
    },
    // 城市修改
    cityUpdate(val) {
      console.log(val)
      this.dialogCityFormResetting();
      this.dialogCityForm = val;
      this.dialogCityFormVisible = true;
      this.getCityGradeList();
    },
    // 城市保存
    citySave() {
      axios.post(`http://localhost:10086/api-city/city/save`, this.dialogCityForm).then(res => {
        console.log(res)
        this.cityGradeList = res.data.code;
        this.dialogCityFormVisible = false;
        this.getCityList();
      })
    },
    /*
      ------------------------------------------------
      * 车辆类型配置
      * */
    // 获取车辆类型配置,车辆类型,车辆能源列表
    getCarList() {
      axios.get(`http://localhost:10086/api-car/car/list?pageNum=${this.carPageNum}&pageSize=${this.carPageSize}&carTypeId=${this.formInlineCar.carTypeId}&carEnergyId=${this.formInlineCar.carEnergyId}&vehicleModel=${this.formInlineCar.vehicleModel}&carBrand=${this.formInlineCar.carBrand}&carManufactor=${this.formInlineCar.carManufactor}`).then(res => {
        console.log(res)
        this.carList = res.data.data.list;
        this.carTotal = res.data.data.total;
      })
    },
    getCarTypeList() {
      axios.get(`http://localhost:10086/api-car/carType/list`).then(res => {
        console.log(res)
        this.carTypeList = res.data.data;
      })
    },
    getCarEnergyList() {
      axios.get(`http://localhost:10086/api-car/carEnergy/list`).then(res => {
        console.log(res)
        this.carEnergyList = res.data.data;
      })
    },
    // 分页器
    carHandleSizeChange(val) {
      this.carPageSize = val
      this.getCarList();
    },
    carHandleCurrentChange(val) {
      this.carPageNum = val;
      this.getCarList();
    },
    // 城市等级配置查询表单重置
    carResetting() {
      this.formInlineCar = {
        carTypeId: [1, 2, 3, 4],
        carEnergyId: [1, 2, 3],
        vehicleModel: "",
        carBrand: "",
        carManufactor: ""
      }
    },
    // 城市等级配置查询表单查询
    carQuery() {
      console.log(this.formInlineCar);
      this.getCarList();
    },
    dialogCarFormResetting() {
      this.dialogCarForm = {
        carTypeId: 1,
        carEnergyId: 1,
        vehicleModel: "",
        carBrand: "",
        carManufactor: ""
      }
    },
    carAdd() {
      this.dialogCarFormResetting();
      this.dialogCarFormVisibleTitle = '新增车辆类型';
      this.dialogCarFormVisible = true;
    },
    carUpdate(val) {
      this.dialogCarFormResetting();
      this.dialogCarFormVisibleTitle = '修改车辆类型';
      this.dialogCarFormVisible = true;
      axios.post(`http://localhost:10086/api-car/car/findById/${val.id}`).then(res => {
        console.log(res)
        this.dialogCarForm = res.data.data;
      })
    },
    carSave(dialogCarForm) {
      this.$refs[dialogCarForm].validate((valid) => {
        if (valid) {
          console.log(this.dialogCarForm)
          axios.post(`http://localhost:10086/api-car/car/save`,this.dialogCarForm).then(res=>{
            console.log(res);
            if(res.data.code==200){
              this.$message({
                message: '保存成功',
                type: 'success'
              });
            }else{
              this.$message({
                message: res.data.msg,
                type: 'error'
              });
            }
          })

          this.dialogCarFormVisible = false;
          this.getCarList();
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    /**
     * 敏感词库
     */
    // 查询表单重置
    getSensitiveWordsList(){
      axios.get(`http://localhost:10086/api-sensitiveWords/sensitiveWords/list?pageNum=${this.sensitiveWordsPageNum}&pageSize=${this.sensitiveWordsPageSize}&sensitiveWords=${this.formInlineSensitiveWords.sensitiveWords}`).then(res => {
        console.log(res)
        this.sensitiveWordsList = res.data.data.list;
        this.sensitiveWordsTotal = res.data.data.total;
      })
    },
    sensitiveWordsResetting() {
      this.formInlineSensitiveWords = {
        sensitiveWords: ""
      };
    },
    // 查询表单查询
    sensitiveWordsQuery() {
      console.log(this.formInlineSensitiveWords);
      this.getSensitiveWordsList();
    },
    // 分页器
    sensitiveWordsHandleSizeChange(val) {
      this.sensitiveWordsPageSize = val
      this.getSensitiveWordsList();
    },
    sensitiveWordsHandleCurrentChange(val) {
      this.sensitiveWordsPageNum = val;
      this.getSensitiveWordsList();
    },
    dialogSensitiveWordsFormResetting() {
      this.dialogSensitiveWordsForm = {
        sensitiveWords: ""
      }
    },
    sensitiveWordsAdd() {
      this.dialogSensitiveWordsFormResetting();
      this.dialogSensitiveWordsFormVisibleTitle = '新增敏感词';
      this.dialogSensitiveWordsFormVisible = true;
    },
    sensitiveWordsUpdate(val) {
      this.dialogSensitiveWordsFormResetting();
      this.dialogSensitiveWordsFormVisibleTitle = '修改敏感词';
      axios.post(`http://localhost:10086/api-sensitiveWords/sensitiveWords/findById/${val.id}`).then(res => {
        console.log(res)
        this.dialogSensitiveWordsForm = res.data.data;
      })
      this.dialogSensitiveWordsFormVisible = true;
    },
    sensitiveWordsSave(){
      if(!this.dialogSensitiveWordsForm.id){
        axios.post(`http://localhost:10086/api-sensitiveWords/sensitiveWords/insert`,this.dialogSensitiveWordsForm).then(res=>{
          console.log(res)
          if(res.data.data.code == 200){
            this.$message({
              message: '保存成功',
              type: 'success'
            });
            this.dialogSensitiveWordsFormVisible = false;
            this.getSensitiveWordsList();
          }else{
            this.$message({
              message: res.data.data.msg,
              type: 'error'
            });
            this.dialogSensitiveWordsForm = {
              sensitiveWords: ""
            }
          }
        });
      }else{
        axios.post(`http://localhost:10086/api-sensitiveWords/sensitiveWords/update`,this.dialogSensitiveWordsForm).then(res=>{
          console.log(res)
          if(res.data.data.code == 200){
            this.$message({
              message: '保存成功',
              type: 'success'
            });
            this.dialogSensitiveWordsFormVisible = false;
            this.getSensitiveWordsList();
          }else{
            this.$message({
              message: res.data.data.msg,
              type: 'error'
            });
            this.dialogSensitiveWordsForm = {
              sensitiveWords: ""
            }
          }
        });
      }

    },
    /**
     * 操作日志
     */
    getLogList(){
      axios.get(`http://localhost:10086/api-log/log/list?pageNum=${this.logPageNum}&pageSize=${this.logPageSize}&log=${this.formInlineLog.log}`).then(res => {
        console.log(res);
        this.logList = res.data.data.list;
        this.logTotal = res.data.data.total;
      })
    },
    logHandleSizeChange(val) {
      this.logPageSize = val
      this.getLogList();
    },
    logHandleCurrentChange(val) {
      this.logPageNum = val;
      this.getLogList();
    },
    logExport(){

    },
    logQuery(){

    },
    logUpdate(){

    },
    // 操作日志查询表单重置
    logResetting() {
      this.formInlineCar = {
        carTypeId: [1, 2, 3, 4],
        carEnergyId: [1, 2, 3],
        vehicleModel: "",
        carBrand: "",
        carManufactor: ""
      }
    },

  },
  created() {
    this.getCityList();
    this.getCityGradeList();
  }
};
</script>

<style>
.bold-label .el-form-item__label {
  font-weight: bold;
}

</style>